package com.jfs.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @Description 国标注册设备表
 * @E-mail cwm3412638@163.com
 * @Author cwm
 * @Date 2022-08-23
 */
@Data
@TableName("t_device")
@KeySequence(value = "customIdGenerator")
@ApiModel(description = "国标注册设备信息表")
public class Device {

    @ApiModelProperty(value = "设备主键")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty(value = "设备编号")
    @TableField(value = "device_id")
    private String deviceId;

    @ApiModelProperty(value = "设备名称")
    private String name;

    @ApiModelProperty(value = "设备制造商")
    private String manufacturer;

    @ApiModelProperty(value = "设备型号")
    private String model;

    @ApiModelProperty(value = "固件版本")
    private String firmware;

    @ApiModelProperty(value = "传输协议UDP/TCP")
    private String transport;

    @ApiModelProperty(value = "ip地址")
    private String ip;

    @ApiModelProperty(value = "端口号")
    private Integer port;

    @ApiModelProperty(value = "注册时间")
    @TableField(value = "register_time")
    private Date registerTime;

    @ApiModelProperty(value = "心跳时间")
    @TableField(value = "keepalive_time")
    private Date keepaliveTime;

    @ApiModelProperty(value = "在线状态0离线1在线")
    private Boolean online;

    @ApiModelProperty(value = "数据流传输模式UDP:udp传输 TCP-ACTIVE：tcp主动模式 TCP-PASSIVE：tcp被动模式")
    @TableField(value = "stream_mode")
    private String streamMode;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "update_time",fill =FieldFill.INSERT_UPDATE)
    private Date updateTime;
}
